package com.fjut.pms.action;

import java.util.List;

import com.fjut.pms.pojo.Pay;
import com.fjut.pms.service.IPayService;
import com.fjut.pms.utils.PageBean;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class PayAction extends ActionSupport implements ModelDriven<PageBean> {

	private static final long serialVersionUID = 7010010377887377167L;
	private IPayService payService;
	private PageBean page = new PageBean();
	private Pay pay = new Pay();
	private int id;

	public String show() {
		page = payService.findPay(page, id);
		return "show";
	}

	public String count() {
		List l=payService.count();
		return "count";
	}

	public String add() {
		payService.save(pay);
		return "add";
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public IPayService getPayService() {
		return payService;
	}

	public void setPayService(IPayService payService) {
		this.payService = payService;
	}

	public PageBean getPage() {
		return page;
	}

	public void setPage(PageBean page) {
		this.page = page;
	}

	public Pay getPay() {
		return pay;
	}

	public void setPay(Pay pay) {
		this.pay = pay;
	}

	public PageBean getModel() {
		return this.getPage();
	}

}
